﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace TravisCI
{
    public partial class JobPage : PhoneApplicationPage
    {
        private JobViewModel job;
        public JobPage()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            this.DataContext = PhoneApplicationService.Current.State["job"];
            this.job = this.DataContext as JobViewModel;
        }

        public void ApplicationBarRefresh_Click(object sender, EventArgs e)
        {
            job.Refresh();
        }
    }
}